/**
 * All rights Reserved, Designed By Administrator 
 * @Title: 	LoginActivity.java 
 * @Package org.android.application.marksixmanage 
 * @Description: 	TODO(用一句话描述该文件做什么) 
 * @author:	Administrator   
 * @date:	2012-7-7 下午3:53:07 
 * @version	V1.0   
 */
package org.android.application.marksixmanage.activity;

import org.android.application.marksixmanage.R;
import android.app.Activity;
import android.app.AlertDialog;
import android.content.DialogInterface;
import android.os.Bundle;
import android.view.View;
import android.view.WindowManager;
import android.view.View.OnClickListener;
import android.widget.Button;
import android.widget.CheckBox;
import android.widget.EditText;

/**
 * @ClassName: LoginActivity
 * @Description:TODO (帐号登录界面)
 * @author: jiaogq
 * @date: 2012-7-7 下午3:53:07
 * 
 */
public class LoginActivity extends Activity implements OnClickListener {

	private EditText edt_UserName; // 用户名
	private EditText edt_PassWord; // 用户密码
	private CheckBox btn_remember_acount; // 记住帐号
	private CheckBox btn_remember_acount_psw; // 记住密码
	private Button btn_submit; // 确定
	private Button btn_quit; // 取消

	@Override
	public void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);
		setContentView(R.layout.activity_login);
		
		getWindow().setSoftInputMode(WindowManager.LayoutParams.SOFT_INPUT_ADJUST_PAN);

		edt_UserName = (EditText) findViewById(R.id_login.edt_username);
		edt_PassWord = (EditText) findViewById(R.id_login.edt_password);
		btn_remember_acount = (CheckBox) findViewById(R.id_login.btn_remember_acount);
		btn_remember_acount_psw = (CheckBox) findViewById(R.id_login.btn_remember_acount_psw);
		btn_submit = (Button) findViewById(R.id_login.btn_submit);
		btn_quit = (Button) findViewById(R.id_login.btn_quit);
		
		btn_submit.setOnClickListener(this);
		btn_quit.setOnClickListener(this);
	}
	
	@Override
	public void onClick(View v) {
		// TODO Auto-generated method stub
		switch (v.getId()) {
		case R.id_login.btn_submit:
			showMessage("标题", "测试AlertDialog");
			break;
		case R.id_login.btn_quit:
			break;
		default:
			break;
		}
	}
	
	private void showMessage (String title, String message) {
		// 显示AlertDialog
		new AlertDialog.Builder(this).setTitle(title).setMessage(message)
				.setPositiveButton("确定", new DialogInterface.OnClickListener() {
					// 点击AlertDialog上的按钮的事件处理代码
					@Override
					public void onClick(DialogInterface dialog, int which) {
					}
				}).show();
 	}

}
